#pragma once
#ifndef EXPLOSIONMODEL_H
#define EXPLOSIONMODEL_H

class CEntityExplosion;
#include <vector>
using namespace std;

enum eExplosionTemplate
{
	eIMPACTPROJECTILE,
	eEXPLOSIONSHIP,
	eEXPLOSIONDRAGON
};
class CExplosionManager
{
private:
	static CExplosionManager* instance;

	vector<CEntityExplosion*> vectorExplosionTemplate;

	int indexFirstExplosion;
	int indexLastExplosion;

protected:
	CExplosionManager(void);
	~CExplosionManager(void);

public:
	static CExplosionManager& getInstance(void);
	void CExplosionManager::Close(void);

	void CExplosionManager::createExplosionTemplate(int indexAnimation, int offsetSpawnX, int offsetSpawnY);

	void CExplosionManager::createAllExplosion(int numberOfExplosion);
	void CExplosionManager::spawnExplosion(CEntityExplosion* explosionTemplate, int positionX, int positionY);

	CEntityExplosion* CExplosionManager::getExplosionTemplate(int index);
	int CExplosionManager::getIndexFirstExplosion(void)const;
	int CExplosionManager::getIndexLastExplosion(void)const;

	void CExplosionManager::setIndexFirstExplosion(int indexFirstExplosion);
	void CExplosionManager::setIndexLastExplosion(int indexLastExplosion);
};
#define EXPLOSIONMANAGER CExplosionManager::getInstance() 

#endif
